#ifndef __M_MSG_H__
#define __M_MSG_H__ 

#include"util.hpp"
#include"level.hpp"
#include<thread>
#include<memory>

namespace bitlog
{
    struct LogMsg
    {
        using ptr = std::shared_ptr<LogMsg>;
        size_t _line;
        size_t _ctime;
        std::thread::id _tid;
        std::string _name;
        std::string _file;
        std::string _payload;
        LogLevel::value _level;
        LogMsg(std::string &name, std::string file, size_t line, std::string &&payload, LogLevel::value level)
            :_name(name),_file(file),_payload(std::move(payload)),_level(level),_line(line),_ctime(util::date::now()),_tid(std::this_thread::get_id()) {}

    };
}

#endif 
